package com.epalmpay.service.management;

import java.util.List;

import com.epalmpay.entity.Role;

public interface IRoleService {
	
	

	/**列出此组下级角色
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<Role> listAllRolesByPId(Role pd) throws Exception;
	
	/**通过id查找
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public Role findObjectById(Role pd) throws Exception;
	
	
	/**通过用户名获取角色信息
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public Role findObjectByUserName(String userName) throws Exception;
	
	/**添加
	 * @param pd
	 * @throws Exception
	 */
	public void add(Role pd) throws Exception;
	
	/**保存修改
	 * @param pd
	 * @throws Exception
	 */
	public void edit(Role pd) throws Exception;
	
	/**删除角色
	 * @param ROLE_ID
	 * @throws Exception
	 */
	public void deleteRoleById(String ROLE_ID) throws Exception;
	
	/**给当前角色附加菜单权限
	 * @param role
	 * @throws Exception
	 */
	public void updateRoleRights(Role role) throws Exception;
	
	/**通过id查找
	 * @param roleId
	 * @return
	 * @throws Exception
	 */
	public Role getRoleById(String ROLE_ID) throws Exception;
	
	/**给全部子角色加菜单权限
	 * @param pd
	 * @throws Exception
	 */
	public void setAllRights(Role pd) throws Exception;
	
	/**权限(增删改查)
	 * @param msg 区分增删改查
	 * @param pd
	 * @throws Exception
	 */
	public void saveB4Button(String msg,Role pd) throws Exception;
	
	/**保存角色菜单权限
	 * @param msg 
	 * @param pd
	 * @throws Exception
	 */
	public void saveMenuqx(String roleId,String menuIds) throws Exception;
	/**保存按钮权限
	 * @param msg 
	 * @param pd
	 * @throws Exception
	 */
	public void saveB4Button(String roleId,String menuIds,String msg) throws Exception;
	
	
}
